# import os
# import re
# import requests
# headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0"}
# response = requests.get("https://www.sanchuangedu.cn/",headers=headers)
# html = response.text
# html_url = response.url
# print(html)
# result1 = re.findall(r'img src="((?!http).*?\.(jpg|gif|png))"',html)
# result2 = re.findall(r'img src="(http[s]?.*?\.(jpg|gif|png))"',html)
# file = './pic'
# if not os.path.exists(file):
#     os.mkdir(file)
# for i,url in enumerate(result2):
#     resp = requests.get(result2[i][0])
#     with open("pic/{}.{}".format(i,result2[i][1]),mode="wb")as f:
#         f.write(resp.content)
# for i,url in enumerate(result1):
#     print(str(html_url)+url[0])
#     url_html = str(html_url)+url[0]
#     resp = requests.get(url_html)
#     with open("pic/{}ping.{}".format(i,result1[i][1]),mode="wb")as f:
#         f.write(resp.content)

#匹配里面的每一个单词
#import re
#msg = "san chuang tong le,welcome,'hello world',learn python"
#ret = re.findall(r"(?<!\')\b\w+\b(?!\')",msg)
#print(ret)
